<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><s:text name='editAndReply'/></title>
<link rel="stylesheet" href="view/question/css/global.css" type="text/css" media="screen">
<link rel="stylesheet" href="view/question/css/edit-style.css" type="text/css" media="screen">
<link rel="stylesheet" href="view/question/js/pagination/pagination.css" type="text/css" media="screen">
<link rel="stylesheet" href="kindeditor/themes/default/default.css" />
<link rel="stylesheet" href="kindeditor/plugins/code/prettify.css" />
<script type="text/javascript" src="view/question/js/jquery-1.8.3.js"></script>
<script type="text/javascript" src="view/question/js/pagination/jquery.pagination.js"></script>
<script type="text/javascript" src="daoepingjs/script_common.js"></script> 
<script type="text/javascript" src="view/question/myjs/question.js"></script> 
<script type="text/javascript" src="view/question/myjs/nation.jsp"></script> 
<script  type="text/javascript" src="kindeditor/kindeditor.js"></script>
<script type="text/javascript" src="kindeditor/plugins/code/prettify.js"></script>
<script type="text/javascript" src="kindeditor/lang/zh_CN.js"></script>
<script type="text/javascript" src="daoepingjs/script_common.js"></script>
</head>
<script type="text/javascript"  language="javascript">

$(document).ready(function() {
	 selectData("question_category","","findBsc_categoryList","" ); 
 	 selectedData("question_category","question_category_selected");
 	 selectData("checkbox-user","checkbox-user","findUsr_friendList","" );
 	 spanUser("hidden_user" , "span_user");
 	 checkedData("checkbox_user_name" , "hidden_user");
});

</script>
<body>

<a href = "view/question/viewQuestion.jsp?flag=0" >home page</a>
<a href = "view/question/viewQuestiondraft.jsp?flag=1" >back</a>
<div class="navigation-bar">
	<div class="personal">
	 <a href="#"><img src="view/question/image/p1.gif" alt="" /><s:text name='manManLi'/></a>
	 <a href="#"><s:text name='myDaoEPing'/></a>
	 <a href="#"><s:text name='myCenter'/></a>
	 <br/>
	 <span ><s:text name='theTestArchitect'/></span>
	 <span ><s:text name='shangHai'/></span>
	</div>
	<div class="clear"></div>
</div>
<div class = "body-content">
<div id="main-content">


  <div class="edit-answer" id="show_content">
  	 <div class="q-title">
	   <!-- question owner -->
	  <input type="hidden" name="bzn_question.usr_user.id" value="${question.usr_user.id}" />
	  <input type="hidden" value = "${question.id}"   />
	  <input type="hidden" value = "myquestion"   name="page.flag"/>
	   <span class="title-content">${question.title}</span>
	   <span class="edit"><a onclick="questionDraftEditorShow()" style="cursor:hand"><s:text name='edit'/></a></span>
	   </div>
		<div class="field">
		${question.bsc_category.name}
		</div>	
		<div >
		${question.content}
      	</div>
      	
      <span id="span_user"></span>
	</div>
	
	<div class="edit-answer" id="edit_content" style="display:none">
	<form action="editBzn_question.action" id="question_form" method="post">
  		<div class="q-title">
	  		<!-- question owner -->
			<input type="hidden" name="bzn_question.usr_user.id" value="${question.usr_user.id}" id="userId"/>
			<input type="hidden" value = "${question.id}"   name="bzn_question.id"/>
			<input type="hidden" value = "myquestion"   name="page.flag"/>
			<input type="hidden" name="bzn_question.flag"  id = "question_flag" value = "${question.flag}" />
		  	<span class="title-content">   
		  		<input type="text" value="${question.title}" name="bzn_question.title"/>
		  	</span>
		</div>
		<div class="field">
			<input type="hidden" value="${question.bsc_category.id}" id="question_category_selected"/>
			<select id="question_category" name="bzn_question.bsc_category.id"></select>
		</div>	
		<div >
			<input type="hidden" value="${question.content}" id="question_content_hidden"/>
			<textarea id="question_content_edit" name="bzn_question.content"></textarea>
		</div>
		<input type="button" value="<s:text name='submit'/>" onclick="questionSubmit('')"/><input type="button" value="addtomyquestion" onclick="questionSubmit('addtoquestion')"/> <input type="button" value="<s:text name='cancel'/>" onclick="questionDraftEditorShow()"/>
      <input type="hidden" name="jsonData.jsonData" id="hidden_user" value="${questionassigned}"/>
     </form>
    
     <div id="checkbox-user"></div>
	</div>
	
	

	
	</div>
</div>
</body>
</html>